package com.walnut.service;

import com.walnut.model.Immortal;

import java.util.List;

/**
 * The manager for operation of the immortals
 * Created by parker on 15/4/5.
 */
public interface ImmortalManager {
    /**
     * create a new immortal
     * @param immortal  the candidate
     */
    void addImmortal(Immortal immortal);

    /**
     * delete the specific immortal
     * @param immortalId    the unique identity of the specific immortal
     */
    void deleteImmortal(Integer immortalId);

    /**
     * retrieve the all immortals
     * @return  list of all immortals
     */
    List<Immortal> getAllImmortals();

    /**
     * retrieve the detail info of the specific immortal
     * @param immortalId    the unique identity of the specific immortal
     * @return  the specific immortal
     */
    Immortal getImmortal(Integer immortalId);

    /**
     * retrieve the part of detail info of the specific immortal
     * @param id   the unique identity of the specific immortal
     * @param selectedFields the selected fields which will be used by developers
     * @return  the specific immortal
     */
    Immortal getImmortal(Integer id, String selectedFields);
}
